<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2024/9/14
  Time: 下午2:39
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    String username=null;
    Cookie[] cookies= request.getCookies();
    for(int i=0;i<cookies.length;i++){
        Cookie cname= cookies[i];
        if(cname.getName().equals("username")){
            response.sendRedirect("main.jsp");
        }
    }
%>

<h2>登录功能</h2>
<form action="/login" method="get">
    <input type="text" name="username" id="usename" placeholder="请输入账号"><br>
    <input type="password" name="password" id="password" placeholder="请输入密码"><br>
    <input type="submit" value="登录"><br>
    <input type="checkbox" name="noLogin">30天内免登录<br>
</form>
<a href="signIn.html">点击跳转注册</a>
</body>
</html>
